1. Field of the Invention
This invention relates to a position detection system and method using image processing so as to find a rotation angle and a coordinate for a check object.
2. Description of the Related Art
Hitherto, the following method has been known as a method of finding a rotation angle from a reference position for a check object contained in an input image (check image) given by picking up an image by an image input unit such as a TV camera: The concentration difference between the check object and background is used to binarize the input image with respect to the concentration, thereby separating the check object from the background, then a moment of inertia of the check object is found and the center position of the check object and the rotation angle of a main axis are calculated. This kind of art is adopted for position detection of parts on a manufacturing line. For example, it is used for a robot eye to control a robot for detecting orientation of supplied parts, holding the parts, and attaching the parts to predetermined positions.
The art for finding the main axis of the check object as described above involves the following problem: If the outline of the check object is a circle, the main axis cannot be found. Thus, if a character, etc., is written in check object P like a coin and the check object P contains caorientation (see FIGS. 6(a) and 6(b)), the rotation angle of the check object P cannot be found. If the outline has rotation symmetry like a square, the main axis cannot be determined one, thus a similar problem arises. Further, even if main axis M (see FIGS. 7(a) and 7(b)) can be found, information representing orientation is not contained in the main axis M. Thus, for example, when the check object P is symmetric with respect to a line as shown in FIGS. 7(a) and 7(b), if it differs in position 180 degrees, the check object P shown in FIG. 7(b) cannot be distinguished from that in FIG. 7(a).
In contrast, a pattern matching method of collating a check object with a previously entered template, thereby finding the rotation angle of the check object is known as described in Japanese Patent Publication No. Hei. 6-89341. In the art described here, particularly, an image at a corner of a part is collated as the check object, thereby decreasing the processing amount. It is considered that the art can be used to detect the rotation angle of the check object as shown in FIG. 7. However, since only the image at the corner is used, when the outline is a circle or a square, the problem remains unsolved.
Further, the following method has also been known as a method of finding a position (rotation angle and coordinate) for a check object contained in an input image (check image) given by picking up an image by an image input unit such as a TV camera:
As this kind of position detection system, hitherto a system disclosed in Japanese Patent Publication No. Hei. 6-160047 has been available. This system performs rough detection processing of detecting a rough position of an approximate position of a check object in a check range based on the comparison result of comparison processing of comparing images provided by compressing the check image and a correct solution image subjected to the detection displacement operation of displacing by rough detection displacement amount at a time in the check image, then performs precise detection processing of detecting a more precise position of the check object in the check range in the proximity of the rough position based on the comparison result of comparison processing of comparing the images provided by compressing the check image and the correct solution image subjected to the detection displacement operation of displacing by rough detection displacement amount at a time in the check image at a compression rate more moderate than the previous compression rate, and detects the position of the check object in the check range in multiple steps.
More particularly, the position detection system performs compression processing by extracting (or thinning out) some of the pixels making up the correct solution image.
The conventional position detection system, which detects the position of the check object in the check range in multiple steps, takes a shorter detection time than the time taken for accurately detecting the position of the check object in the check range from the beginning by one-step detection processing.
However, since the position detection system performs compression processing by extracting or thinning out some of the pixels making up the correct solution image, when the pixel extracted from the pixels making up the correct solution image does not have an average value and has a peculiar value, the position of the check object in the check range cannot precisely be detected (for example, when the noises are picked up).